﻿<%@ Page Language="VB" AutoEventWireup="false" CodeFile="RaffleList.aspx.vb" Inherits="Backend_RaffleList" %>

<%@ Register Src="Menu.ascx" TagName="Menu" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title> Arwani Backend Panel</title>
</head>
<body>
    <script type="text/javascript">
        function ConfirmationBox(username) {

            var result = confirm('Are you sure you want to delete ' + username + ' Details');
            if (result) {

                return true;
            }
            else {
                return false;
            }
        }
    </script>
    <form id="form1" runat="server">
    <div>
        <uc1:Menu ID="Menu1" runat="server" /><br />
        <div style="text-align: center; font-size: 28px; color: Blue">
            <asp:Label ID="lblHeading" runat="server" Text="Raffle List" style="color:Black;font-size:XX-Large;text-decoration:underline;"></asp:Label>
        </div><br />
        <div style="float: right; margin-top: -30px;margin-right:70px;">
            <asp:Button ID="btnExcel" runat="server" OnClick="btnExcel_Click" Text="Export" />
        </div>
        <div align="center">
        <asp:GridView ID="gvRaffle" runat="server" Width="90%" GridLines="None" CellPadding="4"
            OnRowDataBound="OnRowDataBound" EnableModelValidation="True" ForeColor="#333333"
            AutoGenerateColumns="false" AllowPaging="true" PageSize="20" DataKeyNames="ID" HorizontalAlign="Center"  CssClass="table">
            <HeaderStyle HorizontalAlign="Left" />
            <PagerSettings Mode="NumericFirstLast" PageButtonCount="4" FirstPageText="First"
                LastPageText="Last" />
            <Columns>
                <asp:BoundField DataField="ContactName" ReadOnly="true" HeaderText="Contact Name " />
                <asp:BoundField DataField="ComapanyName" ReadOnly="true" HeaderText="Company Name " />
                <asp:BoundField DataField="OfficePhoneNumber" ReadOnly="true" HeaderText="Office No." />
                <asp:BoundField DataField="MobilePhoneNumber" ReadOnly="true" HeaderText="Mobile No." />
                <asp:BoundField DataField="EmailID" ReadOnly="true" HeaderText="Email ID" />
                <asp:BoundField DataField="Code" ReadOnly="true" HeaderText="Code" />
               <asp:BoundField DataField="RaffleName" ReadOnly="true" HeaderText="Raffle Name" />
            

                 <asp:TemplateField HeaderText="Date">
                        <ItemTemplate>
                            <asp:Label ID="lblDate" runat="server" Text='<%#Eval("CurrentDate","{0:dd/MM/yyyy}")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                  <asp:TemplateField>
                                <ItemTemplate>
                                <a href="EditRaffleList.aspx?id=<%#DataBinder.Eval(Container.DataItem,"ID") %>"> Edit</a>
                                </ItemTemplate>
                            </asp:TemplateField>
                
                <asp:TemplateField HeaderText="">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkdelete" runat="server" OnClick="lnkdelete_Click">Delete</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        </asp:GridView>
        </div>
    </div>
    </form>
</body>
</html>
